package com.icloud.system.boot.service.impl;

import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.icloud.common.web.util.ObjectUtil;
import com.icloud.system.api.dto.SaveAdminOperationLogDto;
import com.icloud.system.boot.mapper.AdminWhiteListOperationLogMapper;
import com.icloud.system.boot.model.AdminWhiteListOperationLog;
import com.icloud.system.boot.service.AdminWhiteListOperationLogService;
import org.springframework.stereotype.Service;


/**
 * 后台账户白名单操作日志service实现类
 */

@Service
public class AdminWhiteListOperationLogServiceImpl extends ServiceImpl<AdminWhiteListOperationLogMapper, AdminWhiteListOperationLog> implements AdminWhiteListOperationLogService {
    @Override
    public void addAdminWhiteListOperationLog(SaveAdminOperationLogDto dto) {
        AdminWhiteListOperationLog adminWhiteListOperationLog = new AdminWhiteListOperationLog();
        BeanUtil.copyProperties(dto, adminWhiteListOperationLog, ObjectUtil.getNullField(dto));
        save(adminWhiteListOperationLog);
    }
}
